﻿<%@ Page Title="Dealer Profile" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="DealerProfileEdit.aspx.cs" Inherits="VSM.DealerProfileEdit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function isNumberKey(sender, evt) {
            var txt = sender.value;
            var dotcontainer = txt.split('.');
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (!(dotcontainer.length == 1 && charCode == 46) && charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        function OpenProvince() {
            var url = "../../ProvincePopup.aspx";
            Main.openCustomDialog(url, 600, 610, "Province List");
        }
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="DealerCode" runat="server" />
                <h2>
                    &nbsp;Dealer Detail</h2>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td class="FormLineItemAlt" style="width: 150px">
                                <asp:Label ID="lblDealerCode" Text="Dealer Code" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="middle" colspan="3">
                                <asp:TextBox ID="txtDealerCode" runat="server" Width="122px"></asp:TextBox>
                                &nbsp;&nbsp;&nbsp;<asp:Label ID="lblForeignName" Text="Foreign Name" runat="server" />
                                &nbsp;<asp:TextBox ID="txtForeignName" runat="server" Width="60%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblDealerName" Text="Dealer Name" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:TextBox ID="txtDealerName" runat="server" TextMode="MultiLine" Height="45px" Width="98%"></asp:TextBox>
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblAddress" Text="Address" runat="server" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Height="45px" Width="98%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblTaxCode" Text="Tax Code" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" >
                                <asp:TextBox ID="txtTaxCode" runat="server" Text="" Width="150px"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblProvince" Text="Province" runat="server" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtProvinceCode" runat="server" BackColor="#E6E6E6" 
                                    ReadOnly="True" style="width: 13%;"></asp:TextBox>
                                <asp:TextBox ID="txtProvinceName" runat="server" BackColor="#E6E6E6" ReadOnly="True" style="width: 35%;"></asp:TextBox>
                                <asp:Button ID="btnSelectProvince" runat="server" OnClientClick="OpenProvince(); return false;" 
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat; font-weight: bold" Text="..." Width="22px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblTel_01" Text="Tel. 1" runat="server" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtTel1" runat="server" Width="150px" Height="20px"></asp:TextBox>
                                <asp:Label ID="lblTel_02" runat="server" Text="Tel. 2" />
                                <asp:TextBox ID="txtTel2" runat="server" Width="150px"></asp:TextBox>
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblBizRegistrCert" runat="server" 
                                    Text="Bussiness Regist. Cert." />
                            </td>
                            <td class="FormLineItem">
                                <asp:FileUpload ID="FileUploadControl_1" runat="server" />
                                <asp:Button ID="btnUpload" runat="server" onclick="btnUpload_Click" 
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat; font-weight: bold" 
                                    Text="Upload" Width="50px" />
                                <asp:HyperLink ID="HyperLink_FileDownload" runat="server" CssClass="GridViewLink">HyperLink</asp:HyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblMobi" Text="Mobile Phone" runat="server" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtMobilePhone" runat="server" Width="150px"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblFax" Text="Fax" runat="server" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtFax" runat="server" Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblEmail" Text="E-mail" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtEmail" runat="server" Width="300px"></asp:TextBox>
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblWebsite" Text="Website" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtWebsite" runat="server" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblBusinessRegistrationCertificate" Text="Business Regist. Cert. No." ToolTip="Business Registration Certificate Number" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtBizRegCertificate" Text="" runat="server" Width="300px"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblIssueDate" Text="Issue Date" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtIssueDate" runat="server" Width="100px" ></asp:TextBox>
                                <asp:ImageButton ID="imgIssueDate" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtIssueDate"
                                    PopupButtonID="imgIssueDate" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblIssueBy" Text="Issue By" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtIssueBy" runat="server" Width="300px"></asp:TextBox>
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblCharterCapital" Text="Charter Capital" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtCharterCapital" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblInveCapital" Text="Investment Capital" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtInvestmentCapital" Text=""  Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"  runat="server" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblBankAccount" Text="Bank Account" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtBankAccount" Text="" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblBankName" Text="Bank Name" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtBankName" runat="server" Width="300px"></asp:TextBox>
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblRepresentative" Text="Representative" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtRepresentative" Text="" Width="300px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblPosition" Text="Position" runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtPosition" Text="" runat="server" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblADSL" Text="ADSL Info." runat="server" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" >
                                <asp:TextBox ID="txtADSLInfo" Text="" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblUpload" Text="Upload Speed" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtUpload" Text="" runat="server" />
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblDownload" Text="Download Speed" runat="server" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:TextBox ID="txtDownload" Text="" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" colspan="4">
                                <cc1:TabContainer ID="TabContainer1" class="FormLineItemAlt" runat="server" 
                                    Width="100%" ActiveTabIndex="0">
                                    <cc1:TabPanel ID="tabShowRoom" class="FormLineItemAlt" runat="server">
                                        <HeaderTemplate>Show Room Information</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Button ID="btnAddShowRoom" Text="Add New" runat="server" 
                                                onclick="btnAddShowRoom_Click" Width="75px" />
                                            <asp:GridView ID="grvShowRoom" runat="server" AllowPaging="True" 
                                                AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="2%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" Style=" width: 98%;" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Show Room Name">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtShowRoomName" AutoPostBack="true" OnTextChanged="txtShowRoomName_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("ShowRoomName") %>' />
                                                            <asp:HiddenField ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>' />
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Address">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="30%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtAddress" AutoPostBack="true" OnTextChanged="txtAddressShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("Address") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Tel/Fax">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtTelFax" AutoPostBack="true" OnTextChanged="txtTelFaxShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("TelFax") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Show Room Area">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtShowRoomArea" AutoPostBack="true" OnTextChanged="txtShowRoomArea_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("ShowRoomArea") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Service Yard Area">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtServiceYardArea" AutoPostBack="true" OnTextChanged="txtServiceYardAreaShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("ServiceYardArea") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="General Area">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtGeneralArea" AutoPostBack="true" OnTextChanged="txtGeneralAreaShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("GeneralArea") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Ground Rent">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />                                                        
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtGroundRent" AutoPostBack="true" OnTextChanged="txtGroundRentShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("GroundRent") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Owner Info.">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="12%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtOwnerInfo" AutoPostBack="true" OnTextChanged="txtOwnerInfoShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("OwnerInfo") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Land Leasing Period">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtLandLeasingPeriod" AutoPostBack="true" OnTextChanged="txtLandLeasingPeriodShwR_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("LandLeasingPeriod") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table class="GridInner" style="width: 100%; border-color: White; text-align: center;" border="1" rules="all" cellspacing="2" cellpadding="2">
                                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Show Room Name</span>
                                                            </th>
                                                            <th>
                                                                <span>Address</span>
                                                            </th>
                                                            <th>
                                                                <span>Tel/Fax</span>
                                                            </th>
                                                            <th>
                                                                <span>Show Room Area</span>
                                                            </th>
                                                            <th>
                                                                <span>Service Yard Area</span>
                                                            </th>
                                                            <th>
                                                                <span>General Area</span>
                                                            </th>
                                                            <th>
                                                                <span>Ground Rent</span>
                                                            </th>
                                                            <th>
                                                                <span>Owner Info.</span>
                                                            </th>
                                                            <th>
                                                                <span>Land Leasing Period</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="10">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" HorizontalAlign="Center" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabServiceYard" BackColor="Transparent" runat="server">
                                        <HeaderTemplate>Service Yard Information</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Button ID="btnAddServiceYard" Text="Add New" runat="server" 
                                                onclick="btnAddServiceYard_Click" Width="75px" />
                                            <asp:GridView ID="grvServiceYard" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner" PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" Style=" width: 98%;" runat="server" Text='<%# Bind("No") %>' BorderStyle="none" />
                                                        </ItemTemplate>
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="2%" />
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Service Yard Name">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtServiceYardName" AutoPostBack="true" OnTextChanged="txtServiceYardName_OnTextChanged" Style="width: 98%;" runat="server" Text='<%# Bind("ServiceYardName") %>' />
                                                            <asp:HiddenField ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>' />
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Address">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="30%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtAddress" AutoPostBack="true" OnTextChanged="txtAddressSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("Address") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Tel/Fax">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtTelFax" AutoPostBack="true" OnTextChanged="txtTelFaxSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("TelFax") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Service Yard Area for VSM">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtServiceYardArea4VSM" AutoPostBack="true" OnTextChanged="txtServiceYardArea4VSM_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("ServiceYardArea4VSM") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="General Area">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtGeneralArea" AutoPostBack="true" OnTextChanged="txtGeneralAreaSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("GeneralArea") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Ground Rent">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtGroundRent" AutoPostBack="true" OnTextChanged="txtGroundRentSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("GroundRent") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Owner Info.">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="12%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtOwnerInfo" AutoPostBack="true" OnTextChanged="txtOwnerInfoSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("OwnerInfo") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Land Leasing Period">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtLandLeasingPeriod" AutoPostBack="true" OnTextChanged="txtLandLeasingPeriodSvcYard_OnTextChanged" Style="width:98%;" runat="server" Text='<%# Bind("LandLeasingPeriod") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table class="GridInner" style="width: 100%; border-color: White; text-align: center;" border="1" rules="all" cellspacing="2" cellpadding="2">
                                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Service Yard Name</span>
                                                            </th>
                                                            <th>
                                                                <span>Address</span>
                                                            </th>
                                                            <th>
                                                                <span>Tel/Fax</span>
                                                            </th>
                                                            
                                                            <th>
                                                                <span>Service Yard Area for VSM</span>
                                                            </th>
                                                            <th>
                                                                <span>General Area</span>
                                                            </th>
                                                            <th>
                                                                <span>Ground Rent</span>
                                                            </th>
                                                            <th>
                                                                <span>Owner Info.</span>
                                                            </th>
                                                            <th>
                                                                <span>Land Leasing Period</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="9">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" Font-Bold="True" 
                                                    HorizontalAlign="Center" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabMgmtDept" BackColor="Transparent" runat="server">
                                        <HeaderTemplate>Management Department</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Button ID="btnAddMgmtDept" Text="Add New" runat="server" 
                                                onclick="btnAddMgmtDept_Click" Width="75px" Visible="False" />
                                            <asp:GridView ID="GrvMgmtDept" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner" PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="2%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" Style=" width: 98%;" runat="server" Text='<%# Bind("No") %>' BorderStyle="none" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Name">
                                                        <HeaderStyle VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="20%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtSlpName" Style=" width: 98%;" runat="server" Text='<%# Bind("SlpName") %>' />
                                                            <asp:HiddenField ID="hdnSlpCode" runat="server" Value='<%# Bind("SlpCode") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Position">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="30%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtU_ChucVu" Style=" width: 98%;" runat="server" Text='<%# Bind("U_ChucVu") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="YoBirth">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtU_NamSinh" Style=" width: 98%;" runat="server" Text='<%# Bind("U_NamSinh") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Educated">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtU_Trinhdo" Style=" width: 98%;" runat="server" Text='<%# Bind("U_Trinhdo") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Telephone">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtU_Sodt" Style=" width: 98%;" runat="server" Text='<%# Bind("U_Sodt") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="E-mail">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtU_Email" Style=" width: 98%;" runat="server" Text='<%# Bind("U_Email") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table class="GridInner" style="width: 100%; border-color: White; text-align: center;" border="1" rules="all" cellspacing="2" cellpadding="2">
                                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Name</span>
                                                            </th>
                                                            <th>
                                                                <span>Position</span>
                                                            </th>
                                                            <th>
                                                                <span>YoBirth</span>
                                                            </th>
                                                            <th>
                                                                <span>Educated</span>
                                                            </th>
                                                            <th>
                                                                <span>Telephone</span>
                                                            </th>
                                                            <th>
                                                                <span>E-mail</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="7">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" Font-Bold="True" 
                                                    HorizontalAlign="Center" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabGroupCompany" BackColor="Transparent" runat="server">
                                        <HeaderTemplate>Company Group</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:Button ID="btnAddGrpCompany" Text="Add New" runat="server" 
                                                onclick="btnAddGrpCompany_Click" Width="75px" />
                                            <asp:GridView ID="grvGrpCompany" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner" PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="2%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" Style=" width: 98%;" runat="server" Text='<%# Bind("No") %>' BorderStyle="none" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Group Company Name">
                                                        <HeaderStyle VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="49%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtGrpName" Style="width: 99%;" AutoPostBack="true" OnTextChanged="txtGrpName_OnTextChanged" runat="server" Text='<%# Bind("GrpName") %>' />
                                                            <asp:HiddenField ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Place">
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="49%" />
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="txtPlace" Style="width: 99%;" AutoPostBack="true" OnTextChanged="txtPlace_OnTextChanged" runat="server" Text='<%# Bind("Place") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table class="GridInner" style="width: 100%; border-color: White; text-align: center;" border="1" rules="all" cellspacing="2" cellpadding="2">
                                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Group Company Name</span>
                                                            </th>
                                                            <th>
                                                                <span>Place</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" Font-Bold="True" 
                                                    HorizontalAlign="Center" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                </cc1:TabContainer>
                            </td>
                        </tr>
                    </table>
                </div>
                <table width="100%" border="0">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 300px;">
                                        <asp:Button ID="btnUpdate" runat="server" Text="Add Dealer" OnClick="btnUpdate_Click"
                                            Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;
                                            color: White;" BorderStyle="Solid" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger  ControlID="btnUpload" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
